//
//  ZLPullMenuItem.h
//  ZLPullMenu
//
//  Created by 科大 on 2024/5/29.
//

#import <Foundation/Foundation.h>
#import "ZLPullMenuConfig.h"

NS_ASSUME_NONNULL_BEGIN

@interface ZLPullMenuOption : NSObject
/// 选项标题
@property (nonatomic, copy) NSString *optionTitle;
/// 样式配置
@property (nonatomic, strong) ZLPullMenuOptionpConfig *config;
/// 是否选中
@property (nonatomic, assign) BOOL selected;
/// 初始化
/// - Parameters:
///   - optionTitle: 选项标题
///   - selected: 是否选中
///   - config: 样式配置
+ (instancetype)optionWithTitle:(NSString *)optionTitle selected:(BOOL)selected;
+ (instancetype)optionWithTitle:(NSString *)optionTitle selected:(BOOL)selected config:(ZLPullMenuOptionpConfig *)config;
@end

@interface ZLPullMenuGroup : NSObject
/// 组标题
@property (nonatomic, copy) NSString *groupTitle;
/// 样式配置
@property (nonatomic, strong) ZLPullMenuGroupConfig *config;
/// 是否多选
@property (nonatomic, assign) BOOL selecteds;
/// 是否必选
@property (nonatomic, assign) BOOL mustSelect;
/// 选项列表
@property (nonatomic, copy) NSArray<ZLPullMenuOption *> *options;
/// 初始化
/// - Parameters:
///   - groupTitle: 组标题
///   - selecteds: 是否可以多选
///   - options: 选项数据
///   - config: 样式配置
+ (instancetype)groupWithTitle:(NSString *)groupTitle options:(NSArray<ZLPullMenuOption *> *)options;
+ (instancetype)groupWithTitle:(NSString *)groupTitle selecteds:(BOOL)selecteds mustSelect:(BOOL)mustSelect options:(NSArray<ZLPullMenuOption *> *)options;
+ (instancetype)groupWithTitle:(NSString *)groupTitle selecteds:(BOOL)selecteds mustSelect:(BOOL)mustSelect options:(NSArray<ZLPullMenuOption *> *)options config:(ZLPullMenuGroupConfig *)config;
@end

@interface ZLPullMenuItem : NSObject
/// 顶部菜单标题
@property (nonatomic, copy) NSString *menuTitle;
/// 样式配置
@property (nonatomic, strong) ZLPullMenuConfig *config;
/// 分组列表
@property (nonatomic, copy) NSArray<ZLPullMenuGroup *> *groups;
/// 是否选中
@property (nonatomic, assign) BOOL selected;
/// 初始化
/// - Parameters:
///   - menuTitle: 菜单标题
///   - groups: 组数据
///   - config: 样式配置
+ (instancetype)itemWithTitle:(NSString *)menuTitle groups:(NSArray<ZLPullMenuGroup *> *)groups;
+ (instancetype)itemWithTitle:(NSString *)menuTitle groups:(NSArray<ZLPullMenuGroup *> *)groups config:(ZLPullMenuConfig *)config;
@end

NS_ASSUME_NONNULL_END
